// components/agreeProtocol/agreeProtocol.js
const app = getApp()
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isAgree: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    protocolUrl: "https://mini.jiabao19.com/jb_user_agreement.html",
    protocoUrlTwo: "https://mini.jiabao19.com/jb_user_protocol.html"
  },

  /**
   * 组件的方法列表
   */
  methods: {
    agreeAction() {
      this.triggerEvent("agreenAction")
    },
    pushToProtocol() {
      app.globalData.webUrl = this.data.protocolUrl
      wx.navigateTo({
        url: '/pages/webViewPage/webViewPage',
      })
    },
    pushToProtocolTwo() {
      app.globalData.webUrl = this.data.protocoUrlTwo
      wx.navigateTo({
        url: '/pages/webViewPage/webViewPage',
      })
    },
  }
})
